import request from '@/utils/request';

// 分页查询-收货地址
export function listAddresses(query : any) {
    return request({
        url: '/app/store/addresses/list',
        method: 'get',
        params: query,
    });
}

// 查询收货地址详细
export function getAddresses(id: any) {
    return request({
        url: '/app/store/addresses/' + id,
        method: 'get',
    });
}


// 收货地址-新增
export function addAddresses(data : any) {
    return request({
        url: '/app/store/addresses',
        method: 'post',
        data: data,
    });
}

// 收货地址-编辑
export function updateAddresses(data : any) {
    return request({
        url: '/app/store/addresses/',
        method: 'put',
        data: data,
    });
}

// 收货地址-删除
export function delAddresses(id : any) {
    return request({
        url: '/app/store/addresses/' + id,
        method: 'delete',
    });
}
